package com.moneywelcome.investfacade;

import com.moneywelcome.investfacade.dto.SubscribeDto;
import com.moneywelcome.investfacade.dto.SubscribeRecordDto;
import com.moneywelcome.investfacade.vo.RecordPageVo;
import com.moneywelcome.investfacade.vo.SubscribeVo;
import com.moneywelcome.results.PageResult;
import com.moneywelcome.results.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(
        contextId="investSubscribeApi",//服务名字
        value = "invest" // 区分不同client
)
public interface InvestSubscribeApi {
    @PostMapping("/subscribe")
    Result<SubscribeDto> subscribe(@RequestBody SubscribeVo subscribeVo);
    @PostMapping("/subscribeRecord")
    Result<PageResult<SubscribeRecordDto>> subscribeRecord(@RequestBody RecordPageVo subscribeRecordPageVo);
    @PostMapping("/subscribeInfo")
    Result<SubscribeRecordDto> subscribeInfo(@RequestParam("investSerial") String investSerial);
}
